﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Site.master" AutoEventWireup="true" CodeFile="WIN01_4A.aspx.cs" Inherits="IFRS_WIN01_4A" %>

<%@ Register Assembly="vsm.WebControls" Namespace="vsm.WebControls" TagPrefix="vsm" %>
<%@ Register Assembly="vsm.CustomControl" Namespace="vsm.CustomControl" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../Content/plugins/jquery-ui/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
     <script type="text/javascript">
         window.SetValueCurrency = function (Value1, Value2) {
             document.getElementById("<%= hidCurrencyCode.ClientID %>").value = Value1;
             document.getElementById("<%= txtCurrencyCode.ClientID %>").value = Value1;
         }

         window.SetValueGLAccount = function (Value1, Value2) {
             document.getElementById("<%= hidGLAccountCode.ClientID %>").value = Value1;
             document.getElementById("<%= txtGLAccountCode.ClientID %>").value = Value1;
         }

         window.SetValueCostCenter = function (Value1, Value2) {
             document.getElementById("<%= hidCostCenter.ClientID %>").value = Value1;
             document.getElementById("<%= txtCostCenter.ClientID %>").value = Value2;
         }

         $(document).ready(function () {
             $('#ddlDataType').change(function () {
                 var sel = $("#ddlDataType").val();
                 if (sel == "1") {
                     $('#lblStartDeposit').text("วันแรกที่เริ่มฝาก");
                     $('#lblAmount').text("จำนวนเงินฝาก");
                     $('#reqStartDepositDate').text("กรุณาระบุวันแรกที่เริ่มฝาก");
                     $('#reqAmount').text("กรุณาระบุจำนวนเงินฝาก");
                 }
                 else {
                     $('#lblStartDeposit').text("วันที่รับเงินปันผล");
                     $('#lblAmount').text("จำนวนเงินปันผล");
                     $('#reqStartDepositDate').text("กรุณาระบุจำนวนเงินปันผล");
                     $('#reqAmount').text("กรุณาระบุจำนวนเงินปันผล");
                     
                 }
             });
         });
        </script>   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="container-custom">
        <div class="table_master">
            <div class="table_detail">
                <div class="rowinfo">
                    <div class="collabel">
                        <asp:Label ID="lblDataType" runat="server" Text="<%$Resources:ifrsField,DATA_TYPE%>" />&nbsp;:&nbsp;
                    </div>
                    <div class="colinfo">
                        <asp:DropDownList ID="ddlDataType" runat="server" SkinID="DropDownListWithNoColor" ClientIDMode="Static"/>
                        <span class="red">*</span>
                        <asp:RequiredFieldValidator ID="reqDataType" runat="server" ErrorMessage=""
                            ControlToValidate="ddlDataType" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                    <div class="collabel">
                        <asp:Label ID="lblTransactionDate" runat="server" Text="<%$Resources:ifrsField,DATE_TRANSACTION%>" />&nbsp;:&nbsp;
                    </div>
                    <div class="colinfo">
                        <asp:TextBox CssClass="datepicker" ID="txtTransactionDate" runat="server" SkinID="dateText" 
                             onblur="datebox_onblur( this, event );" ></asp:TextBox>
                        <span class="red">*</span>
                        <asp:RequiredFieldValidator ID="reqTransactionDate" runat="server" ErrorMessage=""
                            ControlToValidate="txtTransactionDate" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="rowinfo">
                    <div class="collabel">
                        <asp:Label ID="lblAccountNo" runat="server" Text="<%$Resources:ifrsField,NO_ACCOUNT%>" />&nbsp;:&nbsp;
                    </div>
                    <div class="colinfo">
                        <asp:TextBox ID="txtAccountNo" runat="server" SkinID="TextBoxWithNoColor"></asp:TextBox>
                        <span class="red">*</span>
                        <asp:RequiredFieldValidator ID="reqAccountNo" runat="server" ErrorMessage=""
                            ControlToValidate="txtAccountNo" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>

                    <div class="collabel">
                        <asp:Label ID="lblCostCenter" runat="server" Text="<%$Resources:ifrsField,COST_CENTER%>" />&nbsp;:&nbsp;
                    </div>
                    <div class="colinfo">
                        <cc1:TextboxAutoComplete ID="txtCostCenter" runat="server" SkinID="TextBoxWithNoColor"></cc1:TextboxAutoComplete>
                        <asp:Button ID="btnCostCenter" runat="server" Text="..." 
                            CausesValidation="False" />
                        <span class="red">*</span>
                        <asp:RequiredFieldValidator ID="reqCostCenter" runat="server" ErrorMessage=""
                            ControlToValidate="txtCostCenter" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="rowinfo">
                    <div class="collabel">
                        <asp:Label ID="lblGLAccountCode" runat="server" Text="<%$Resources:ifrsField,GL_ACCOUNT%>" />&nbsp;:&nbsp;
                    </div>
                    <div class="colinfo">
                        <cc1:TextboxAutoComplete ID="txtGLAccountCode" runat="server" SkinID="TextBoxWithNoColor"></cc1:TextboxAutoComplete>
                        <asp:Button ID="btnGLAccountCode" runat="server" Text="..." 
                            CausesValidation="False" />
                        <span class="red">*</span>
                        <asp:RequiredFieldValidator ID="reqGLAccountCode" runat="server" ErrorMessage=""
                            ControlToValidate="txtGLAccountCode" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>

                    <div class="collabel">
                        <asp:Label ID="lblCurrencyCode" runat="server" Text="<%$Resources:ifrsField,CURRENCYCODE%>" />&nbsp;:&nbsp;
                    </div>
                    <div class="colinfo">
                        <cc1:TextboxAutoComplete ID="txtCurrencyCode" runat="server" SkinID="TextBoxWithNoColor"></cc1:TextboxAutoComplete>
                        <asp:Button ID="btnCurrencyCode" runat="server" Text="..." 
                            CausesValidation="False" />
                        <span class="red">*</span>
                        <asp:RequiredFieldValidator ID="reqCurrencyCode" runat="server" ErrorMessage=""
                            ControlToValidate="txtCurrencyCode" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="rowinfo">
                    <div class="collabel">
                        <asp:Label ID="lblStartDeposit" runat="server" Text="<%$Resources:ifrsField,DATE_DIVIDENDS%>" ClientIDMode="Static"/>&nbsp;:&nbsp;
                    </div>
                    <div class="colinfo">
                        <asp:TextBox CssClass="datepicker" ID="txtStartDepositDate" runat="server" SkinID="dateText"
                             onblur="datebox_onblur( this, event );"></asp:TextBox>
                        <span class="red">*</span>
                        <asp:RequiredFieldValidator ID="reqStartDepositDate" runat="server" ErrorMessage="" ClientIDMode="Static"
                            ControlToValidate="txtStartDepositDate" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                    <div class="collabel">
                        <asp:Label ID="lblExpiryDate" runat="server" Text="<%$Resources:ifrsField,DATE_EXPIRY%>" />&nbsp;:&nbsp;
                    </div>
                    <div class="colinfo">
                        <asp:TextBox CssClass="datepicker" ID="txtExpiryDate" runat="server" SkinID="dateText"
                             onblur="datebox_onblur( this, event );"></asp:TextBox>
                        <span class="red">*</span>
                        <asp:RequiredFieldValidator ID="reqExpiryDate" runat="server" ErrorMessage=""
                            ControlToValidate="txtExpiryDate" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="rowinfo">
                    <div class="collabel">
                        <asp:Label ID="lblAmount" runat="server" Text="<%$Resources:ifrsField,AMOUNT_DIVIDENDS%>" ClientIDMode="Static"/>&nbsp;:&nbsp;
                    </div>
                    <div class="colinfo">
                        <cc1:TextboxNumber ID="txtAmount" runat="server" SkinID="TextBoxWithNoColor"
                                        MaxLength="10" DigitDecimal="2" TypeTextbox="Currency" />&nbsp;
                        <asp:Label ID="lblBaht" runat="server" Text="<%$Resources:ifrsField,BAHT%>" />&nbsp;
                         <span class="red">*</span>
                        <asp:RequiredFieldValidator ID="reqAmount" runat="server" ErrorMessage="" ClientIDMode="Static"
                            ControlToValidate="txtAmount" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                    <div class="collabel">
                        <asp:Label ID="lblStatus" runat="server" Text="<%$Resources:ifrsField,LIST_STATUS%>" />&nbsp;:&nbsp;
                    </div>
                    <div class="colinfo">
                               <asp:TextBox ID="txtStatus" runat="server" SkinID="ReadOnlyBox" ></asp:TextBox>
                    </div>
                </div>
            </div>
            <div class="colbtn">
                <asp:Button ID="btnSAVE_NEW" SkinID="NormalButton" runat="server"  
                    Text="<%$Resources:ifrsButton,SAVE_NEW%>" onclick="btnSAVE_NEW_Click" />&nbsp;
                <asp:Button ID="btnSAVE" SkinID="NormalButton" runat="server" Text="<%$Resources:ifrsButton,SAVE%>" OnClick="btnSAVE_Click" />&nbsp;
                 <asp:Button ID="btnCLEAR" SkinID="NormalButton" runat="server" Text="<%$Resources:ifrsButton,CLEAR%>" OnClick="btnCLEAR_Click" />&nbsp;
                    <asp:Button ID="btnCANCEL" SkinID="NormalButton" runat="server" Text="<%$Resources:ifrsButton,CANCEL%>" OnClick="btnCANCEL_Click" />
            </div>
        </div>
    </div>
    <asp:HiddenField ID="hidGLAccountCode" runat="server" />
    <asp:HiddenField ID="hidCostCenter" runat="server" />
    <asp:HiddenField ID="hidCurrencyCode" runat="server" />
    <script src="../Content/js/Currency.js" type="text/javascript"></script>
    <script src="../Content/plugins/jquery-ui/ui/jquery.ui.core.js" type="text/javascript"></script>
    <script src="../Content/plugins/jquery-ui/ui/jquery.ui.widget.js" type="text/javascript"></script>
    <script src="../Content/plugins/jquery-ui/ui/jquery.ui.datepicker.js" type="text/javascript"></script>
    <script src="../Content/plugins/custom.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(function () {
            $(".datepicker").initDatepicker();
        });
    </script>
</asp:Content>